package model;

import java.util.GregorianCalendar;


public class Test {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Service service = Service.getInstance();
		StorageArea st = new StorageArea(1);
		SparePart part = new SparePart(777777, st, "");
		SparePart part2 = new SparePart(341111, st, "");
		Machine m = new Machine(7878787, "", "", "", 1);
//		Machine m2 = new Machine(78781, "", "", "", 2);
//		Machine m3 = new Machine(1, "", "", "", 2);
//		service.registerMachineLine(part, 10, m);
//
//		System.out.println(m.getMachineLines().toString());

//		Repair repair = new Repair(m);

//		List<Machine> list = new ArrayList<Machine>();
//		list.add(m);
//		list.add(m2);
//		list.add(m3);

		service.createSparePart(77, st, "", 0, 1);

//		service.createRepair(service.createMachine(11, "", "", "", 00));
	//		service.createRepair(m);
//		repair.calcDowntime();
//		repair.toString();
//		System.out.println(repair);
//		System.out.println(service.returnMachines());
//		service.searchMachine(list,1);

//		System.out.println(sp);
//		System.out.println();
//		service.searchSparePart(77);
//		
		GregorianCalendar date1 = new GregorianCalendar(2009, 02, 13, 14, 15);
		GregorianCalendar date2 = new GregorianCalendar(2009, 02, 15, 14, 15);
		System.out.println((int) ((date2.getTimeInMillis() - date1.getTimeInMillis())
				/ (24 * 60 * 60 * 1000)) + "");
	}
}
